/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author Andre
 */
public class Menu extends javax.swing.JFrame {

    /**
     * Creates new form Menu
     */
    public Menu() {
        initComponents();
        BufferedImage image=null;
        File imageFile=new File(".\\src\\Imagens\\logo.png");
        try {
            image=ImageIO.read(imageFile);
            
        } catch (IOException ex) {
        }
        this.setIconImage(image);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jB_cliente = new javax.swing.JButton();
        jB_locacao = new javax.swing.JButton();
        jB_filmes = new javax.swing.JButton();
        jB_relatorio = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Menu");
        getContentPane().setLayout(null);

        jB_cliente.setFont(new java.awt.Font("DialogInput", 0, 18)); // NOI18N
        jB_cliente.setText("Cliente");
        jB_cliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_clienteActionPerformed(evt);
            }
        });
        getContentPane().add(jB_cliente);
        jB_cliente.setBounds(60, 20, 168, 49);

        jB_locacao.setFont(new java.awt.Font("DialogInput", 0, 18)); // NOI18N
        jB_locacao.setText("Locação");
        jB_locacao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_locacaoActionPerformed(evt);
            }
        });
        getContentPane().add(jB_locacao);
        jB_locacao.setBounds(60, 150, 170, 50);

        jB_filmes.setFont(new java.awt.Font("DialogInput", 0, 18)); // NOI18N
        jB_filmes.setText("Filmes");
        jB_filmes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_filmesActionPerformed(evt);
            }
        });
        getContentPane().add(jB_filmes);
        jB_filmes.setBounds(280, 20, 167, 49);

        jB_relatorio.setFont(new java.awt.Font("DialogInput", 0, 18)); // NOI18N
        jB_relatorio.setText("Relatório");
        jB_relatorio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jB_relatorioActionPerformed(evt);
            }
        });
        getContentPane().add(jB_relatorio);
        jB_relatorio.setBounds(280, 150, 167, 49);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/logo.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(40, 250, 100, 100);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/cats2 copy.png"))); // NOI18N
        getContentPane().add(jLabel2);
        jLabel2.setBounds(136, 282, 350, 103);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-522)/2, (screenSize.height-430)/2, 522, 430);
    }// </editor-fold>//GEN-END:initComponents

    private void jB_clienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_clienteActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FormCliente().setVisible(true);
            }
        });
    }//GEN-LAST:event_jB_clienteActionPerformed

    private void jB_filmesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_filmesActionPerformed
         java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FormFilme().setVisible(true);
            }
        });
    }//GEN-LAST:event_jB_filmesActionPerformed

    private void jB_locacaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_locacaoActionPerformed
       java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FormLocacao().setVisible(true);
            }
        });
    }//GEN-LAST:event_jB_locacaoActionPerformed

    private void jB_relatorioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_relatorioActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FormRelatorios().setVisible(true);
            }
        });
    }//GEN-LAST:event_jB_relatorioActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Menu().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jB_cliente;
    private javax.swing.JButton jB_filmes;
    private javax.swing.JButton jB_locacao;
    private javax.swing.JButton jB_relatorio;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
